Chunk By
Smooths text/reasoning streaming output by buffering until a chunk boundary, then releasing complete chunks with a configurable delay.
Mirrors v6's smoothStream. Critical UX helper for on-device models (LiteRT-LM on Android) that emit raw tokens fast enough to feel jittery — break by word boundaries, sleep delayMs between chunks, the chat surface gets natural reading rhythm.
Three chunking strategies:
ChunkBy.Word (default) — split on whitespace
ChunkBy.Line — split on newlines
ChunkBy.Pattern — custom Regex
Non-text events (tool calls, step-finish, etc.) pass through immediately without delay so the loop logic isn't slowed down.